<?php

class TestController extends Controller
{

    public function view()
    {
        //$this->assign('info', User::register(1, 'py', '123', '{Py}', 'Hau Giang', '0979474581') ?
        //    'Successful': 'Failed');


    }

    public function reset()
    {
        Test::reset();
    }

    public function email()
    {
        $letter = new SmTemplate();
        $letter->assign('new_password', 'new pass ne');
        $letter = $letter->render(VIEWS_DIR. 'email/test.tpl', false);
        $this->assign('tester', $letter);
    }

    /* test Admin */
    public function admin()
    {
        # If visitor isn't administrator, generate exception
        if (!UserController::isLoggedAdmin()) {
            throw new Exception('Access denied!');
        } else {
            $this->assign('info', 'Em cha`o anh e\'c min');
        }
    }

    public function getpass()
    {

    }

    public function test1()
    {

    }
    public function dienthoai()
    {

    }

}